package renda.dao.serivce.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import renda.dao.UserDAO;
import renda.dao.serivce.UserService;
import renda.pojo.Users;

@Service("userService")
@Transactional
public class UserServiceImpl implements UserService {

	@Resource(name = "userDao")
	private UserDAO userDao;

	public void setUserDao(UserDAO userDao) {
		this.userDao = userDao;
	}

	public Users login(Users user) {
		// TODO 加密码校验
		Users user1 = userDao.get(user);
		return user1;
	}

	public Users regist(Users user) {
		Users user1 = userDao.save(user);
		return user1;
	}
}
